<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>新闻添加页面</title>
  <link rel="stylesheet" href="../../../yl/index.css" />
  <!-- 布局样式 -->
  <link rel="stylesheet" href="../../../yl/style.css" />
  <link rel="stylesheet" href="../../../style/wangeditor.css">
  <link rel="stylesheet" href="../../../yl/mobile.css" />
  <link rel="stylesheet" href="../../../yl/easyui.css" />
  <link rel="stylesheet" href="../../../yl/icon.css" />
  <style>
    .el-input__wrapper {
      box-shadow: none;
    }
  </style>
</head>

<body>
  <!-- <div id="app"> -->
  <div class="easyui-navpanel" id="app" v-cloak>
    <header>
      <div class="m-toolbar">
        <div class="m-title">{{action=='Add'?'添加信息':action=='Modify'?'修改信息':''}}</div>
      </div>
    </header>
    <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
      id="MainTable" ref="MainTable"
      :data-options="JSON.stringify({ 'TableName': 'complaints_categories', 'form': 'dataForm' ,'primary_key':'category_id' })">
      <el-form :model="dataForm" ref="form" inline-message="true" style="width: 100%">
        <el-descriptions :column="1" size="large" border>

          <el-descriptions-item>
            <template #label>
              <div class="cell-item">类别名称</div>
            </template>
            <el-form-item prop="category_name" :rules="[{ required: true, message: '请输入类别名称', trigger: 'blur' }]">
              <el-input ref="category_name" v-model="dataForm.category_name" class="borderless-input"
                placeholder="请输入类别名称" />
            </el-form-item>
          </el-descriptions-item>

          <el-descriptions-item>
            <template #label>
              <div class="cell-item">类别描述</div>
            </template>
            <el-form-item prop="description" :rules="[{ required: true, message: '请输入类别描述', trigger: 'blur' }]">
              <el-input ref="description" v-model="dataForm.description" class="borderless-input"
                placeholder="请输入类别描述" />
            </el-form-item>
          </el-descriptions-item>


          <el-descriptions-item>
            <template #label>
              <div class="cell-item">归属部门</div>
            </template>
            <el-form-item prop="department_id" :rules="[{ required: true, message: '请选择归属部门', trigger: 'change' }]">
              <el-cascader filterable style="width: 100%;" v-model="dataForm.department_id" placeholder="请选择归属部门"
                :options="depart" :props="{ emitPath: false,  // 设置只返回选择的最后一级的value
                          value: 'value',
                          label: 'label',checkStrictly: true }" clearable></el-cascader>
              <!-- <el-select   clearable v-model="dataForm.department_id" placeholder="请选择归属部门"
                filterable style="width: 100%">
                <el-option v-for="(item,index) in depart" :key="index" :label="item.Agensies_Name"
                  :value="item.Government_Agencies_SerialNumber"></el-option>
              </el-select> -->
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item>
            <template #label>
              <div class="cell-item">父类别</div>
            </template>
            <el-form-item prop="Parent_SerialNumber">
              <el-cascader filterable style="width: 100%;" v-model="dataForm.Parent_SerialNumber" :options="category"
                :props="{ emitPath: false,
                          value: 'value', 
                          label: 'label',
                          children: 'children',checkStrictly: true }" clearable></el-cascader>
            </el-form-item>
          </el-descriptions-item>

          <el-descriptions-item>
            <template #label>
              <div class="cell-item">事件分配时限</div>
            </template>

            <el-form-item prop="Allocation_Limit" :rules="[{ required: true, message: '请输入事件分配时限',trigger: 'blur'}]">
              <el-input @input="validateInput" @change="validateInput" type="number"
                v-model.trim="dataForm.Allocation_Limit" class="borderless-input" placeholder="请输入分配时限:天数" />
            </el-form-item>
          </el-descriptions-item>

          <el-descriptions-item>
            <template #label>
              <div class="cell-item">事件处理时限</div>
            </template>

            <el-form-item prop="Exec_Limit" :rules="[{ required: true,message: '请输入事件处理时限', trigger: 'blur'}]">
              <el-input @input="validateInput" @change="validateInput" type="number" v-model.trim="dataForm.Exec_Limit"
                class="borderless-input" placeholder="请输入处理时限:天数" />
            </el-form-item>
          </el-descriptions-item>

          <el-descriptions-item>
            <template #label>
              <div class="cell-item">协同办理</div>
            </template>

            <el-form-item prop="bforward">
              <el-switch v-model="dataForm.bforward" active-color="#13ce66" inactive-color="#ff4949" active-value="1"
                inactive-value="0">
              </el-switch>
            </el-form-item>
          </el-descriptions-item>

          <el-descriptions-item>
            <template #label>
              <div class="cell-item">小程序展示</div>
            </template>

            <el-form-item prop="bApp">
              <el-switch v-model="dataForm.bApp" active-color="#13ce66" inactive-color="#ff4949" active-value="1"
                inactive-value="0">
              </el-switch>
            </el-form-item>
          </el-descriptions-item>

        </el-descriptions>
      </el-form>

    </div>
    <footer class="botton-ann">
      <el-button @click="goBack">返回</el-button>
      <el-button type="primary" plain @click="handleSubmit">提交</el-button>
    </footer>
  </div>
</body>
<script src="../../../utils/utils.js"></script>
<script src="../../../utils/compressor.js"></script>
<script src="../../../utils/wangeditor.js"></script>
<script src="../../../config/config.js"></script>
<script src="../../../utils/mixins.js"></script>
<script src="../../../yl/vue.js"></script>
<script src="../../../yl/index.js"></script>
<script src="../../../yl/zh-cn.mjs"></script>
<script src="../../../yl/index.iife.min.js"></script>
<script src="../../../yl/jquery.min.js"></script>
<script src="../../../utils/jquery.cookie.js"></script>
<script src="../../../yl/jquery.easyui.min.js"></script>
<script src="../../../yl/jquery.easyui.mobile.js"></script>
<script src="../../../yl/moment.min.js"></script>
<script src="../../../api/request.js"></script>
<script src="js/add.js"></script>

</html>